package cn.com.wdjedu.androidapp.wjeduandroid.ui.courseui;

import android.content.Context;
import android.widget.ListAdapter;

import com.zhy.adapter.abslistview.CommonAdapter;
import com.zhy.adapter.abslistview.ViewHolder;

import java.util.List;

import cn.com.wdjedu.androidapp.wjeduandroid.R;
import cn.com.wdjedu.androidapp.wjeduandroid.support.lib.view.MyGridView;

/**
 * Created by CCY on 2017/2/13.
 */

public class CourseUiAdapter extends CommonAdapter<CourseList> {
    public CourseUiAdapter(Context context, int layoutId, List<CourseList> datas) {
        super(context, layoutId, datas);
    }

    @Override
    protected void convert(ViewHolder viewHolder, CourseList item, int position) {
        viewHolder.setText(R.id.tv_name,item.getCourseName());
        MyGridView myGridView=viewHolder.getView(R.id.mygridview);
        ListAdapter adpter=new CourseUiAdapterItem(mContext,R.layout.sub_item_course_list,item.getBaselist());
        myGridView.setAdapter(adpter);
    }


}
